<?php
/*
 * Created on 2011-9-26
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 class ControllerAnalyzeUsertimeline extends Controller{
 	public function index(){
 		
 		$this->load->model('analyze/usertimeline');
 		
		$user_id=$this->request->get['user_id'];
		
		$date=$this->model_analyze_usertimeline->getLatestAnalyzeDate($user_id);
		
		if($date==Util::getDate()){
			$taskdp='未满足指定微博分析时间 '.$user_id.'.';
		}else{
 		$result=$this->model_analyze_usertimeline->getUsertimeline($user_id);
		$this->model_analyze_usertimeline->analyzeUsertimeline($result->rows);
		$taskdp='success to analyze a user time line of '.$user_id.'.';
			
		}
		
		
		$this->response->setOutput($this->render($taskdp));
 	}
 }
?>
